package org.iks.common.pojo.message;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.iks.common.aop.serializer.ChatMessageTypeDeserializer;
import org.iks.common.aop.serializer.ChatMessageTypeSerializer;
import org.iks.common.enums.ChatMessageType;

/**
 * Author kzou
 * Date 2024/3/23
 * Description: 存储消息Vo
 */
@Data
public class ChatMessageStoreVo {

    @NotNull
    @Schema(description = "会话密钥版本")
    private Integer secretVersion;


    @NotNull
    @Schema(description = "会话Id")
    private Integer sessionId;

    @NotEmpty
    @Schema(description = "消息文本内容")
    private String content;

    @NotNull
    @JsonSerialize(using = ChatMessageTypeSerializer.class)
    @JsonDeserialize(using = ChatMessageTypeDeserializer.class)
    @Schema(description = "消息类型")
    private ChatMessageType chatMessageType;

}
